<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEmailsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('email', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();


			//varchar 50 邮箱地址
			$table->string('email');
			//php md5加密 长度为6-20位之间
			$table->string('password',32);
			//邮箱确认状态 0未确认 1已确认
			$table->tinyInteger('state');
			//邮箱链接中的唯一标识
			$table->string('uuid');
			//关联tyw_users中的id
			$table->integer('uid');
			$table->softDeletes();


		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('emails');
	}

}
